/*
 * Copyright (C) 2016 yixun All Rights Reserved.
 * 
 * NeedReceiveRefundDto.java
 */
package com.emm.yixun.common.model.dto;

import com.emm.yixun.common.model.NeedAdvanceRefundInfo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

/**
 * [文件名称]<br>
 * NeedReceiveRefundDto.java<br>
 * <br>
 * [文件描述]<br>
 * 待收/退款表 数据辅助类<br>
 * <br>
 * [修改记录]<br>
 * 2016-07-04 14:18:21 创建 陶俊代码生成器<br>
 * 
 * @author 陶俊代码生成器
 * @version 1.00
 */
public class NeedAdvanceRefundInfoDto extends NeedAdvanceRefundInfo {
	private static final long serialVersionUID = 1L;
	/**
	 *需要正序字段名
	 */
	private List<String> asc;
	/**
	 *需要逆序字段名
	 */
	private List<String> desc;
	/**
	 *排序SQL
	 */
	private String orders;
	/**
	 * 是否需要导出
	 */
	private String isExport;
	
	private String ysDateStart;
	
	private String ysDateEnd;
	
	
	
	
    
    /**
	 * ysDateStart.
	 *
	 * @return  the ysDateStart
	 * @since   JDK 1.6
	 */
	public String getYsDateStart() {
		return ysDateStart;
	}

	/**
	 * ysDateEnd.
	 *
	 * @return  the ysDateEnd
	 * @since   JDK 1.6
	 */
	public String getYsDateEnd() {
		return ysDateEnd;
	}

	/**
	 * ysDateStart.
	 *
	 * @param   ysDateStart    the ysDateStart to set
	 * @since   JDK 1.6
	 */
	public void setYsDateStart(String ysDateStart) {
		this.ysDateStart = ysDateStart;
	}

	/**
	 * ysDateEnd.
	 *
	 * @param   ysDateEnd    the ysDateEnd to set
	 * @since   JDK 1.6
	 */
	public void setYsDateEnd(String ysDateEnd) {
		this.ysDateEnd = ysDateEnd;
	}

	/**
	 * isExport.
	 *
	 * @return  the isExport
	 * @since   JDK 1.6
	 */
	public String getIsExport() {
		return isExport;
	}

	/**
	 * isExport.
	 *
	 * @param   isExport    the isExport to set
	 * @since   JDK 1.6
	 */
	public void setIsExport(String isExport) {
		this.isExport = isExport;
	}

	/**
	 *  添加需要正序字段名
	 */
	public void addAsc(String col){
		if(asc==null){
			asc = new LinkedList<String>();
		}
		asc.add(col);
	}
	
	/**
	 *  清空需要正序字段名
	 */
	public void cleanAsc(){
		asc = null;
	}
	
	/**
	 *  添加需要逆序字段名
	 */
	public void addDesc(String col){
		if(desc==null){
			desc = new LinkedList<String>();
		}
		desc.add(col);
	}
	
	/**
	 *  清空需要逆序字段名
	 */
	public void cleanDesc(){
		desc = null;
	}
	
	/**
	 *  如果排序SQL为空根据需要正逆序的字段名拼接排序SQL
	 */
	public String  getOrders() {
		StringBuilder orderStr = null;
		StringBuilder ascStr;
		StringBuilder descStr;
		if(orders==null){
			if(asc!=null){
				ascStr = new StringBuilder();
				orderStr = new StringBuilder();
				String pex = "";
				for(String a : asc){
					ascStr.append(pex+a);
					pex = ",";
				}
				orderStr.append(ascStr.toString()+" ASC");
			}
			if(desc!=null){
				descStr = new StringBuilder();
				String pex = "";
				for(String d : desc){
					descStr.append(pex+d);
					pex = ",";
				}
				if(orderStr==null){
					orderStr = new StringBuilder();
					orderStr.append(descStr.toString()+" DESC");
				}else{
					orderStr.append(","+descStr.toString()+" DESC");
				}
			}
			orders = orderStr!=null?orderStr.toString():null;
		}
		
		return orders;
	}
	
	/**
	 *  设置排序SQL
	 */
	public void setOrders(String orders) {
		this.orders = orders;
	}
	private Date updateTimeBefore;
	private Date updateTimeAfter;
	private Date createTimeBefore;
	private Date createTimeAfter;
	private Date receivablesDateBefore;
	private Date receivablesDateAfter;

    public Date getUpdateTimeBefore() {
        return this.updateTimeBefore;
    }
    public void setUpdateTimeBefore(Date updateTimeBefore) {
        this.updateTimeBefore = updateTimeBefore;
    }

    public Date getUpdateTimeAfter() {
        return this.updateTimeAfter;
    }
    public void setUpdateTimeAfter(Date updateTimeAfter) {
        this.updateTimeAfter = updateTimeAfter;
    }
    public Date getCreateTimeBefore() {
        return this.createTimeBefore;
    }
    public void setCreateTimeBefore(Date createTimeBefore) {
        this.createTimeBefore = createTimeBefore;
    }

    public Date getCreateTimeAfter() {
        return this.createTimeAfter;
    }
    public void setCreateTimeAfter(Date createTimeAfter) {
        this.createTimeAfter = createTimeAfter;
    }
    public Date getReceivablesDateBefore() {
        return this.receivablesDateBefore;
    }
    public void setReceivablesDateBefore(Date receivablesDateBefore) {
        this.receivablesDateBefore = receivablesDateBefore;
    }

    public Date getReceivablesDateAfter() {
        return this.receivablesDateAfter;
    }
    public void setReceivablesDateAfter(Date receivablesDateAfter) {
        this.receivablesDateAfter = receivablesDateAfter;
    }
    
    //应收记录对应的已收总额
    private BigDecimal haveReceivedTotal;
    //应收记录对应的未收总额
    private BigDecimal unReceivedTotal;
	public BigDecimal getHaveReceivedTotal() {
		return haveReceivedTotal;
	}

	public void setHaveReceivedTotal(BigDecimal haveReceivedTotal) {
		this.haveReceivedTotal = haveReceivedTotal;
	}

	public BigDecimal getUnReceivedTotal() {
		return unReceivedTotal;
	}

	public void setUnReceivedTotal(BigDecimal unReceivedTotal) {
		this.unReceivedTotal = unReceivedTotal;
	}
    
	//组团
	private String premisesId;
	//楼栋
	private String buildingId;
	//单元
	private String unitId;

	public String getPremisesId() {
		return premisesId;
	}

	public void setPremisesId(String premisesId) {
		this.premisesId = premisesId;
	}

	public String getBuildingId() {
		return buildingId;
	}

	public void setBuildingId(String buildingId) {
		this.buildingId = buildingId;
	}

	public String getUnitId() {
		return unitId;
	}

	public void setUnitId(String unitId) {
		this.unitId = unitId;
	}
	
}
